package com.javachamp.enums;

public class DeclaringEnums {

	interface I {
		enum E {
			ONE,TWO,THREE;
			interface I2 {
				
				enum E4 {
					COMPUTER, LAPTOP, PC;
				}
			}
		}
	}
	
	protected enum E {
		ONE,TWO,THREE;
		
		enum E2 {
			MOON, SUN, EARTH;
			
			enum E3 {
				ROCK, SAND;
				
				enum E4 {
					COMPUTER, LAPTOP, PC;
				}
			}
			
			public void method() {
				class A {
					
				}
				
				new A();
			}
		}
	}
	
	enum E2 {
		A;
		
		static class A {
			
			interface XX {
				
			}
		}
	}
	
	@interface OK {
		
		class A {
			
			
			enum AAA {
				
			}
			
			interface AAAA {
				
				
				class B {
					
				}
			}
			
			static class C {
				
				interface SDA {
					
				}
			}
		}
		
		
	}
	
}

enum AA{
	
}

interface BB {
	
}

abstract class AAA extends CCC{
	AA aa;
}

abstract class CCC implements BB {
	DeclaringEnums.E.E2.E3.E4 a;
}

@interface PPP {
	@interface PPP2 {
		@interface PPP3 {
			
		}
	}
	
	interface BB2 {
		interface BB3 {
			interface BB4 {
				
			}
		}
	}
	
	class XXX1 {
		DeclaringEnums.OK.A AAA;
		class XXX2 {
			DeclaringEnums.OK.A AAA;
			class XXX3 {
				DeclaringEnums.OK.A AAA;
				int x = 2;
				long y = 2;
				float f = 2.0F;
				double d = 2.0;
				
			}
		}
	}
}

@PPP
class XXX {
	DeclaringEnums.OK.A AAA;
}
